package com.example.appmanager.entity;

import com.google.gson.Gson;

import java.io.Serializable;



public class UserTableEntity implements Serializable {
	private static final long serialVersionUID = 1L;

    /**
     * upassword : 1
     * uname : lu
     * uaccount : lu
     * sex : 男
     * age : 15
     * picture : first_user.jpeg
	 */


    private String upassword;
    private int age;
	private String uname;
	private String uaccount;
	private String sex;
    private String picture;

    public UserTableEntity() {
    }

    public UserTableEntity(String image, String uname, String uaccount, Integer age, String sex, String upassword) {
		this.uname = uname;
		this.uaccount = uaccount;
		this.age = age;
		this.sex = sex;
        this.picture = image;
		this.upassword = upassword;
	}

    public static UserTableEntity objectFromData(String str) {

        return new Gson().fromJson(str, UserTableEntity.class);
	}

	@Override
	public String toString() {
		return "UserTableEntity{" +
				"uname='" + uname + '\'' +
				", uaccount='" + uaccount + '\'' +
				", age=" + age +
				", sex='" + sex + '\'' +
				", upassword='" + upassword + '\'' +
                ", picture='" + picture + '\'' +
				'}';
	}

    public String getUpassword() {
        return upassword;
    }

    public void setUpassword(String upassword) {
        this.upassword = upassword;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getUaccount() {
        return uaccount;
    }

    public void setUaccount(String uaccount) {
        this.uaccount = uaccount;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }
}
